home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWToolbx / Include / FWAlert.h next >
Encoding:
Text File  |  1996-08-16  |  2.9 KB  |  81 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWAlert.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWALERT_H
  11. #define FWALERT_H
  12.  
  13. #ifndef FWALTDEF_H
  14. #include "FWAltDef.h"
  15. #endif
  16.  
  17. // ----- Windows includes -----
  18.  
  19. #if defined(FW_BUILD_WIN) && !defined(_INC_WINDOWS)
  20. #include <Windows.h>
  21. #endif
  22.  
  23. //========================================================================================
  24. // Forward Class Declaration
  25. //========================================================================================
  26.  
  27. class FW_CString;
  28.  
  29. //========================================================================================
  30. // FW_Alert
  31. //========================================================================================
  32.  
  33. FW_AlertResult FW_Alert(const FW_CString& documentName,
  34.                                     const FW_CString& message,
  35.                                     FW_ButtonType buttonType,
  36.                                     FW_IconType iconType,
  37.                                     FW_DefaultButton defaultButton,
  38.                                     FW_Boolean beep);
  39.                                         
  40. FW_AlertResult FW_NoteAlert(const FW_CString& documentName, 
  41.                                     const FW_CString& message);
  42.                                     
  43. FW_AlertResult FW_QuestionAlert(const FW_CString& documentName, 
  44.                                     const FW_CString& message, 
  45.                                     FW_DefaultButton defaultButton);
  46.                                     
  47. FW_AlertResult FW_ErrorAlert(const FW_CString& documentName, 
  48.                                     const FW_CString& message);
  49.  
  50. //========================================================================================
  51. // FW_Alert Inlines
  52. //========================================================================================
  53.  
  54. //----------------------------------------------------------------------------------------
  55. //    FW_NoteAlert
  56. //----------------------------------------------------------------------------------------
  57. inline FW_AlertResult FW_NoteAlert(const FW_CString& documentName, const FW_CString& message)
  58. {
  59.     return FW_Alert(documentName, message, FW_kOK, FW_kNoteAlert, FW_kDefaultButton1, TRUE);
  60. }
  61.  
  62. //----------------------------------------------------------------------------------------
  63. //    FW_QuestionAlert
  64. //----------------------------------------------------------------------------------------
  65. inline FW_AlertResult FW_QuestionAlert(const FW_CString& documentName, 
  66.                                         const FW_CString& message,
  67.                                         FW_DefaultButton defaultButton)
  68. {
  69.     return FW_Alert(documentName, message, FW_kYesNo, FW_kCautionAlert, defaultButton, TRUE);
  70. }
  71.  
  72. //----------------------------------------------------------------------------------------
  73. //    FW_ErrorAlert
  74. //----------------------------------------------------------------------------------------
  75. inline FW_AlertResult FW_ErrorAlert(const FW_CString& documentName, const FW_CString& message)
  76. {
  77.     return FW_Alert(documentName, message, FW_kOK, FW_kStopAlert, FW_kDefaultButton1, TRUE);
  78. }
  79.  
  80. #endif
  81.